home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_11
/
8n11026a
< prev
next >
Wrap
Text File
|
1990-09-17
|
390b
|
22 lines
#include <stdio.h>
main(int argc, char *argv[], char *envp[])
{
int i = 0;
while (envp[i] != NULL) {
printf("envp[%d] ==> |%s|\n", i, envp[i]);
++i;
}
printf("\nenvironment variable count = %d\n", i);
}
envp[0] ==> |COMSPEC=C:\COMMAND.COM|
envp[1] ==> |PROMPT=$p $g|
envp[2] ==> |PATH=c:\dos;c:\util;|
envp[3] ==> |ABC=def|
environment variable count = 4